import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { ResourcesType } from 'libs/db/entity/resources-type.entity';
import { ResourcesTypeController } from './resources-type.controller';
import { ResourcesTypeService } from './resources-type.service';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([ResourcesType])
    ],
    controllers: [
        ResourcesTypeController
    ],
    providers: [
        ResourcesTypeService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class ResourcesTypeModule { }
